package StudyCode.summary.mycollection;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class ReturnsTheSumOfTheElementsOfTheArray {
	public static void main(String[] argv) {
		double[] v = new double[]{34.45, 35.45, 36.67, 37.78, 37.0000,
				37.1234, 67.2344, 68.34534, 69.87700};
		System.out.println("数组元素的总和:" + mass(v));
	}

	public static double mass(double[] v) {
		double somme = 0.0;
		for (int k = 0; k < v.length; k++) {
			somme += v[k];
		}
		return (somme);
	}

}
